package com.yuanfeng.business.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yuanfeng.business.dto.ManageShopSelfCatAddDTO;
import com.yuanfeng.business.dto.WebShopGoodsListQueryDTO;
import com.yuanfeng.business.entity.ShopGoodsCatEntity;
import com.yuanfeng.business.vo.GoodsCatsMenuListVO;
import com.yuanfeng.commoms.vo.goods.GdsListQueryResultVO;
import com.yuanfeng.commoms.vo.shop.ManageShopSelfCatMenuVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @ClassName ShopGoodsCatMapper
 * @Description  店铺商品分类关系表
 * @Author cyp
 * @Date 2023-06-14 15:29:05
 * @Version 1.0
 **/
@Mapper
public interface ShopGoodsCatMapper extends BaseMapper<ShopGoodsCatEntity> {

    /**
     * 查询店铺分类的下级分类
     * @param param
     * @return
     */
    List<Integer> selectChildrenIds(@Param("param")WebShopGoodsListQueryDTO param);

    /**
     * 查询商品信息
     * @param page
     * @param param
     * @return
     */
    IPage<GdsListQueryResultVO> selectWebShopGoodsList(IPage<GdsListQueryResultVO> page, WebShopGoodsListQueryDTO param);


    /**
     * 查询分类信息
     * @return
     */
    List<GoodsCatsMenuListVO> selectAllCat3();

    /**
     * 新增商品分类
     * @param param
     */
    void insertShopSelfCat(@Param("param") ManageShopSelfCatAddDTO param);

    /**
     * 更新商品分类
     * @param param
     */
    void updateShopSelfCat(@Param("param") ManageShopSelfCatAddDTO param);


    List<ManageShopSelfCatMenuVO> queryParentCatId(@Param("shopId") Integer shopId, @Param("commonId") Integer commonId);
}
